/**
 * 綫性查找
 */
public class Demo1 {
    public static void main(String[] args) {
        int[] arr = {2,12,34,32,17,-1};
        int find = 32;

        linnerSearch(arr,find);
    }

    private static int linnerSearch(int[] arr, int find) {
        for(int i=0;i<arr.length;i++){
            if(arr[i]==find){
                return arr[i];
            }
        }
        return -1;
    }

}
